import request from '@/utils/request'

// 查询我的预约列表
export function listAppointment(query) {
  return request({
    url: '/consult/appointment/list',
    method: 'get',
    params: query
  })
}

// 查询我的预约详细
export function getAppointment(myAppointmentId) {
  return request({
    url: '/consult/appointment/' + myAppointmentId,
    method: 'get'
  })
}

export function getScheduling(schedulingId) {
  return request({
    url: '/consult/appointment/getScheduling?schedulingId=' + schedulingId,
    method: 'get'
  })
}


// 新增我的预约
export function addAppointment(data) {
  return request({
    url: '/consult/appointment',
    method: 'post',
    data: data
  })
}

// 修改我的预约
export function updateAppointment(data) {
  return request({
    url: '/consult/appointment',
    method: 'put',
    data: data
  })
}

// 删除我的预约
export function delAppointment(myAppointmentId) {
  return request({
    url: '/consult/appointment/' + myAppointmentId,
    method: 'delete'
  })
}
